projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
947a62b
)
Make help command accept -h and --help
author
Matthew Hall
<matthew@quickbeam.me.uk>
Wed, 29 Oct 2014 12:28:52 +0000
(12:28 +0000)
committer
Matthew Hall
<matthew@quickbeam.me.uk>
Wed, 29 Oct 2014 12:28:52 +0000
(12:28 +0000)
src/bin/cargo.rs
patch
|
blob
|
history
diff --git
a/src/bin/cargo.rs
b/src/bin/cargo.rs
index f243689d34d6a11ccd869fd54a984515fc056337..d82d297abce2f1af64425e45a87566106b7ace3d 100644
(file)
--- a/
src/bin/cargo.rs
+++ b/
src/bin/cargo.rs
@@
-106,6
+106,9
@@
fn execute(flags: Flags, shell: &mut MultiShell) -> CliResult<Option<()>> {
cargo::process_executed(r, shell);
return Ok(None)
}
+ "help" if flags.arg_args[0].as_slice() == "-h" ||
+ flags.arg_args[0].as_slice() == "--help" =>
+ (flags.arg_args, "help"),
"help" => (vec!["-h".to_string()], flags.arg_args[0].as_slice()),
s => (flags.arg_args.clone(), s),
};